<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
	<ui:define name="content">
		<p:ajaxStatus onstart="statusDialog.show();"
			onsuccess="statusDialog.hide();" />

		<p:dialog modal="true" widgetVar="statusDialog" header="Status"
			draggable="false" closable="false">
			<p:graphicImage value="/resources/gfx/ajax-loader.gif" />
		</p:dialog>
		<p:growl id="messages" autoUpdate="true" />
		<h:form id="mainMenu">
			<p:menubar autoDisplay="false">
				<p:submenu label="Gestion">
					<p:menuitem value="User" styleClass="open"
						onclick="lazyloadUserGestion()"></p:menuitem>
				</p:submenu>
				<p:menuitem value="Info" styleClass="undo" onclick="lazyloadInfo()"
					helpText=""></p:menuitem>
			</p:menubar>
		</h:form>
		<h:form id="dialog1">
			<p:outputPanel id="lazypanel">
				<ui:include src="#{desktopMBean.page}" />
			</p:outputPanel>

			<p:remoteCommand name="lazyloadUserGestion" update="lazypanel"
				actionListener="#{desktopMBean.showUsersGestion}"
				oncomplete="userGestion.show()">
			</p:remoteCommand>
			<p:remoteCommand name="lazyloadInfo" update="lazypanel"
				actionListener="#{desktopMBean.showInfo}" oncomplete="info.show()">
			</p:remoteCommand>

		</h:form>
	</ui:define>
</ui:composition>